<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script>
    let obj1 = {
      name: "wuhang",
      getna: function () {
        console.log(this, "普通");

      }
    }
    obj1.getna()


    // es6
    let obj2 = {
      name: "sml",
      getna: () => {
        console.log(this);//作用域变了
      }
    }
    obj2.getna()
  </script>
</head>

<body>

</body>

</html>